import React, { forwardRef, useImperativeHandle, useState } from 'react';
import { Input, Form } from 'antd';

const TemplateModal = forwardRef(({ record }, ref) => {
   const [data, setData] = useState(record);

   useImperativeHandle(ref, () => ({
      getData: () => data,
   }));

   return (
      <Form layout="inline">
         <Form.Item label="平台名称">
            <Input
               size="small"
               value={data.req_psname}
               onChange={(e) => {
                  const value = e.target.value;
                  setData({
                     ...data,
                     req_psname: value,
                  });
               }}
            />
         </Form.Item>
      </Form>
   );
});

export default TemplateModal;
